#include "error.h"

#include <sstream>

namespace anb { namespace net {

error::error(code code, const std::string& str) : m_code(code), m_str(str) {
	std::ostringstream stream;
	stream << std::hex << m_code << ": " << m_str;
	m_what = stream.str();
}

const char* error::what() const {
	return m_what.c_str();
}

} }
